Crate exonum_derive

Source
Expand description

This crate provides macros for deriving some useful methods and traits for the exonum services.

Attribute Macros§

Derive Macros§

  • Derives BinaryValue trait. The target type must implement (de)serialization logic, which should be provided externally.
  • Implements ExecutionFail trait for the given enum. Additionally, From<MyEnum> for ExecutionError conversion is implemented, allowing to use errors in the service code.
  • Derives FromAccess trait.
  • Derives ObjectHash trait. The target type must implement BinaryValue trait.
  • Implements RequireArtifact trait for the given struct or enum. The target type may be generic over type parameters.
  • Derives ServiceDispatcher trait.
  • Derives ServiceFactory trait.